<?php
	
	function getURL() {
		$url = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] =="on") ?
			"https//" : "http://";

		$url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];

		return $url;
	}

	function writeToFile ($filename, $data) {
   		$ourFileHandle = fopen($filename, 'w') or die("can't open file");
    	fwrite($ourFileHandle, $data);
    	fclose($ourFileHandle);
	}
	
?>